#include <stdio.h>
#define MAXSIZE 100
typedef int ElemType;
typedef struct
{
	ElemType data[MAXSIZE];
	int length;
}SqList;

void Creat_SqList(SqList *L,int n)
{
	int i;
	L->length=n;
	i=0;
	printf("\ninput %d data : ",n);
	while(i<n)
	{
		scanf("%d",&L->data[i]);
		i++;
	}
}

void Reverse_SqList(SqList* L)
{
	int i,j,n,t;
	n=L->length;
	if(n==0||n==1) return;
	i=0;
	j=n-1;
	while(i<j)
	{
		t=L->data[i];
		L->data[i]=L->data[j];
		L->data[j]=t;
		i++;
		j--;
	}
}

void Print_SqList(SqList *L)
{
	int i,n;
	n=L->length;
	i=0;
	printf("\noutput %d data : ",n);
	while(i<n)
	{
		printf("%d ",L->data[i]);
		i++;
	}
}

int main()
{
	SqList list,* p;
	int a=7;
	p=&list;
	Creat_SqList(p,a);
	Reverse_SqList(p);
	Print_SqList(p);
	return 0;
}